﻿using CloverNet.Authorization.Demo.Manager.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace CloverNet.Authorization.Demo.Manager.Providers
{
    public class CustomRolePermissionProvider : RolePermissionProvider,IPermissionProvider
    {
        public override RolePermissionCollection GetRoles()
        {
            RolePermissionCollection roles = new RolePermissionCollection()
            {
                new RolePermissionPair(Role.Admin, new object[] { Permission.P_0001 } ),
                new RolePermissionPair(Role.User,
                new object[] { Permission.P_0002,
                        Permission.P_0003,
                        Permission.P_0004,
                        Permission.P_0005,
                        Permission.P_0006
                }
                )
            };

            return roles;
        }

    }
}